//NewCome/Task
/**
 * 任务
 * 
 * @package NewCome\Object
 */
define('Task',
    ['avalon'],
    function () {
        var obj={      
            

obj:{
LID:'',//记录编号  int(11) 必填:1 默认值:,
            TaskName:'',//任务名称  char(50) 必填:1 默认值:,
            CTime:'',//注册时间  int 必填:1 默认值:,
            Stattus:'',//任务状态  tinyint(1) 必填:1 默认值:,
            CUID:'',//指派人  int(11) 必填:1 默认值:,
            ZUID:'',//执行者  int(11) 必填:1 默认值:,
            UID:'',//用户编号  int(11) 必填:1 默认值:,
            Account:'',//账户  char(50) 必填:1 默认值:,
            PWD:'',//密码  char(50) 必填:1 默认值:,
            Email:'',//电子邮箱  char(50) 必填:1 默认值:,
            Role:'',//角色  tinyint(1) 必填:1 默认值:
},
            
get: function (LID,success,error) {
                $$.call({
                    i:"NewCome/Task/get",
                    data:{
                        LID:LID
                    },
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            
gets: function (LIDs,success,error) {
                $$.call({
                    i:"NewCome/Task/gets",
                    data:{
                        "NewCome/Task":LIDs,
                        "P":1,
                        "N":1000000
                    },
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            
save: function (LID,Params,success,error) {
                $$.call({
                    i:'NewCome/Task/save',
                    data:{
                        LID:LID,
                        Params:Params
                    },
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            
del: function (LID,success,error) {
                $$.call({
                    i:"NewCome/Task/del",
                    data:{
                        "LID":LID
                    },
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            
search: function (data,success,error) {
                $$.call({
                    i:"NewCome/Task/search",
                    data:data,
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            
add: function (data,success,error) {
                $$.call({
                    i:'NewCome/Task/add',
                    data:data,
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            
adds: function (data,Replace,success,error) {
                $$.call({
                    i:"NewCome/Task/adds",
                    data:{
                        data:data,
Replace:Replace
                    },
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            /**
     * 条件置换
     * @param W
     * @param Data
     * @return |mixed|
     */
replaceW: function (W,Data,success,error) {
                $$.call({
                    i:"NewCome/Task/replaceW",
                    data:{
                        W:W,
Data:Data
                    },
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            },
            
report: function (Name,Params,P,N,R,success,error) {
                $$.call({
                    i:"NewCome/Task/report",
                    data:{
                        Name:Name,
Params:Params,
P:P,
N:N,
R:R
                    },
                    success:success?success:function () {},
                    error:error?error:function (err) {tip.on(err)}
                })
            }
        }
        return window['obj_NewCome_Task']=obj
    })